
CREATE TABLE daycare.FamilyNotes
  (
   FamilyNoteId INT NOT NULL
                    IDENTITY(1,1)
                    PRIMARY KEY
 , TimeStamp DATETIME2 NOT NULL
 , FamilyId INT NOT NULL
 , NotedById INT NOT NULL
 , NoteText VARCHAR(1000) NOT NULL
  )
ALTER TABLE daycare.FamilyNotes ADD CONSTRAINT DF_FamilyNotes_TimeStamp DEFAULT GETDATE() FOR TimeStamp
ALTER TABLE daycare.FamilyNotes ADD CONSTRAINT FK_FamilyNotes_Families FOREIGN KEY(FamilyId) REFERENCES daycare.Families(FamilyId)
ALTER TABLE daycare.FamilyNotes ADD CONSTRAINT FK_FamilyNotes_Employees FOREIGN KEY(NotedById) REFERENCES daycare.Employees(EmployeeId)
GO